package com.example.secondhandspringboot.domain.dto;
import lombok.Data;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

@Data
public class GoodsDTO {
    @NotBlank(message = "商品名不能为空")
    private String goodsName;
    @NotNull(message = "价格不能为空")
    @Min(value = 0, message = "价格不能小于0")
    private BigDecimal price;
    @NotBlank(message = "商品名不能为空")
    private String description;
    @NotNull(message = "请选择商品分类")
    private Long categoryId;
    @NotNull(message = "请选择商品成色")
    private Long qualityId;
    @NotBlank(message = "商品图片不能为空")
    private String pic;
}
